﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Microsoft.Xna.Framework;
using Microsoft.Xna.Framework.Audio;
using Microsoft.Xna.Framework.Content;
using Microsoft.Xna.Framework.GamerServices;
using Microsoft.Xna.Framework.Graphics;
using Microsoft.Xna.Framework.Input;
using Microsoft.Xna.Framework.Media;
using Microsoft.Xna.Framework.Net;
using Microsoft.Xna.Framework.Storage;

namespace Asteriods
{
    class Bullet : GameObject
    {
        private int maximumMillisecondsOfLife;
        public int MaximumMillisecondsOfLife
        {
            get { return maximumMillisecondsOfLife; }
            set { maximumMillisecondsOfLife = value; }
        }
        public Bullet(Game game, string imagepath, int maximumMillisecondsOfLife)
            : base(game, imagepath)
        {
            this.maximumMillisecondsOfLife = maximumMillisecondsOfLife;
        }
        public override void Update(GameTime gameTime, GraphicsDevice graphicsDevice)
        {
            maximumMillisecondsOfLife -= gameTime.ElapsedGameTime.Milliseconds;
            base.Update(gameTime, graphicsDevice);
        }
    }
}
